.class Lde/dealdoktor/app/util/AsyncImageLoader$4;
.super Ljava/lang/Thread;
.source "AsyncImageLoader.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lde/dealdoktor/app/util/AsyncImageLoader;->loadBitmap(Ljava/lang/String;Lde/dealdoktor/app/util/AsyncImageLoader$ImageCallback;Landroid/graphics/Bitmap;Ljava/lang/String;)Landroid/graphics/Bitmap;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lde/dealdoktor/app/util/AsyncImageLoader;

.field private final synthetic val$handler:Landroid/os/Handler;

.field private final synthetic val$imageUrl:Ljava/lang/String;


# direct methods
.method constructor <init>(Lde/dealdoktor/app/util/AsyncImageLoader;Ljava/lang/String;Landroid/os/Handler;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lde/dealdoktor/app/util/AsyncImageLoader$4;->this$0:Lde/dealdoktor/app/util/AsyncImageLoader;

    iput-object p2, p0, Lde/dealdoktor/app/util/AsyncImageLoader$4;->val$imageUrl:Ljava/lang/String;

    iput-object p3, p0, Lde/dealdoktor/app/util/AsyncImageLoader$4;->val$handler:Landroid/os/Handler;

    .line 79
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 7

    .prologue
    .line 83
    const/4 v0, 0x0

    .line 85
    .local v0, bitmap:Landroid/graphics/Bitmap;
    new-instance v3, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v3}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 86
    .local v3, options:Landroid/graphics/BitmapFactory$Options;
    const/4 v4, 0x3

    iput v4, v3, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 88
    :try_start_0
    new-instance v4, Ljava/net/URL;

    iget-object v5, p0, Lde/dealdoktor/app/util/AsyncImageLoader$4;->val$imageUrl:Ljava/lang/String;

    invoke-direct {v4, v5}, Ljava/net/URL;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4}, Ljava/net/URL;->getContent()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/io/InputStream;

    const/4 v5, 0x0

    invoke-static {v4, v5, v3}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    .line 95
    :goto_0
    iget-object v4, p0, Lde/dealdoktor/app/util/AsyncImageLoader$4;->this$0:Lde/dealdoktor/app/util/AsyncImageLoader;

    #getter for: Lde/dealdoktor/app/util/AsyncImageLoader;->imageCache:Ljava/util/HashMap;
    invoke-static {v4}, Lde/dealdoktor/app/util/AsyncImageLoader;->access$1(Lde/dealdoktor/app/util/AsyncImageLoader;)Ljava/util/HashMap;

    move-result-object v4

    iget-object v5, p0, Lde/dealdoktor/app/util/AsyncImageLoader$4;->val$imageUrl:Ljava/lang/String;

    new-instance v6, Ljava/lang/ref/SoftReference;

    invoke-direct {v6, v0}, Ljava/lang/ref/SoftReference;-><init>(Ljava/lang/Object;)V

    invoke-virtual {v4, v5, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 96
    iget-object v4, p0, Lde/dealdoktor/app/util/AsyncImageLoader$4;->val$handler:Landroid/os/Handler;

    const/4 v5, 0x0

    invoke-virtual {v4, v5, v0}, Landroid/os/Handler;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v2

    .line 97
    .local v2, message:Landroid/os/Message;
    iget-object v4, p0, Lde/dealdoktor/app/util/AsyncImageLoader$4;->val$handler:Landroid/os/Handler;

    invoke-virtual {v4, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 98
    return-void

    .line 89
    .end local v2           #message:Landroid/os/Message;
    :catch_0
    move-exception v1

    .line 90
    .local v1, e:Ljava/lang/Exception;
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method
